-- GENERATED SPELL FOR [Soulflayer] --


function spell0_11359(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(22678,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11359', 7500, 1)
end

function spell1_11359(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_11359', 619, 1)
end

function spell2_11359(pUnit, Event) --@Soul Tap,n/a--
pUnit:FullCastSpellOnTarget(24619,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11359', 12000, 1)
end

function Sorts_11359(pUnit, Event)
local choix_sorts_11359 = math.random(0, 2)
if choix_sorts_11359 == 0 then
pUnit:RegisterEvent('spell0_11359', 1, 1)
end
if choix_sorts_11359 == 1 then
pUnit:RegisterEvent('spell1_11359', 1, 1)
end
if choix_sorts_11359 == 2 then
pUnit:RegisterEvent('spell2_11359', 1, 1)
end
end

function mob11359_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11359', math.random(1500, 3000), 1)
end

function mob11359_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11359_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11359_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11359, 1, 'mob11359_Action')
RegisterUnitEvent(11359, 2, 'mob11359_Leave')
RegisterUnitEvent(11359, 3, 'mob11359_Kill')
RegisterUnitEvent(11359, 4, 'mob11359_Die')
